package com.beiding.test.pg;

import com.beiding.sqlbuilder.ConditionUnit;
import com.beiding.sqlbuilder.ConditionUnitHandler;
import com.beiding.sqlbuilder.SingleParameter;

public class SingleParameterHandler implements ConditionUnitHandler {

    @Override
    public boolean canHandle(ConditionUnit conditionUnit) {
        return conditionUnit instanceof SingleParameter;
    }

    @Override
    public String handle(ConditionUnit conditionUnit) {
        SingleParameter singleParameter = (SingleParameter) conditionUnit;
        return singleParameter.getParameter().execute();
    }
}
